This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Switch to FlutterSurfaceView if no Android view is in the frame#19487
Merged
blasten merged 9 commits intoflutter:masterfrom Jul 6, 2020
Merged
Switch to FlutterSurfaceView if no Android view is in the frame#19487blasten merged 9 commits intoflutter:masterfrom
blasten merged 9 commits intoflutter:masterfrom
Conversation
added 2 commits
July 2, 2020 19:51
blasten
commented
Jul 6, 2020
| // Skip a frame if the embedding is switching surfaces. | ||
| auto should_submit_current_frame = | ||
| previous_frame_view_count_ > 0 || current_frame_view_count == 0; | ||
| if (should_submit_current_frame) { |
Author
There was a problem hiding this comment.
This is false, when the Java side is switching from FlutterSurfaceView to FlutterImageView.
jason-simmons
approved these changes
Jul 6, 2020
| // this becomes true if all the required surfaces have images available. | ||
| // | ||
| // This is used to decide if the platform views can be rendered in the current frame. | ||
| // If one of the surfaces don't have an image, the frame may be incomplete and must be dropped. |
| // Show platform views only if the surfaces have images available in this frame, | ||
| // and if the platform view is rendered in this frame. | ||
| // | ||
| // Otherwise, hide the platform view, but don't remove it from view hierarchy yet as |
Member
There was a problem hiding this comment.
typo: "the view hierarchy"
Author
|
Linux Web Engine is failing on That appears to be fixed upstream. |
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jul 6, 2020
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jul 7, 2020
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jul 7, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This is the last part to address flutter/flutter#58291. When an Android view is present in the frame, we switch the surface from
FlutterSurfaceViewtoFlutterImageView. When no Android view is present, then we switch back to previous surface.cc @jason-simmons
Related Issues
Fixes flutter/flutter#58291
Tests
I added the following tests: Unit tests (WIP)
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.Breaking Change
Did any tests fail when you ran them? Please read handling breaking changes.